<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <meta http-equiv="X-UA-Compatible" content="ie=edge">
  <title>绝对定位方案</title>
  <style>
    .container > div {
      position: absolute;
    }

    .header {
      top: 0;
      height: 300px;
      width: 100%;
      background: #d7f;
    }

    .middle {
      top: 300px;
      bottom: 250px;
      width: 100%;
      background: #cae2f9;
    }

    .footer {
      bottom: 0;
      height: 250px;
      width: 100%;
      background: #4086a9;
    }
  </style>
</head>
<body>
  <div class="container">
    <div class="header"></div>
    <div class="middle"></div>
    <div class="footer"></div>
  </div>
</body>
</html>
